#ifndef DICTTYPE_H
#define DICTTYPE_H
#include "BaseEntity.h"
#include <QString>


class DictType : public BaseEntity{
public:
    qlonglong dictId;
    QString dictName;
    QString dictType;
    QString status;
    QJsonObject toJson() const
    {
        QJsonObject jsonObj;
        jsonObj["dictId"] = static_cast<double>(dictId);
        jsonObj["dictName"] = dictName;
        jsonObj["dictType"] = dictType;
        jsonObj["status"] = status;
        jsonObj["searchValue"] = searchValue;
        jsonObj["createBy"] = createBy;
        jsonObj["createTime"] = createTime;
        jsonObj["updateBy"] = updateBy;
        jsonObj["updateTime"] = updateTime;
        jsonObj["remark"] = remark;
        return jsonObj;
    }

    static DictType toDictType(const QJsonObject& obj)
    {
        DictType sysDict;
        sysDict.dictId = static_cast<qlonglong>(obj["dictId"].toDouble());
        sysDict.dictName = obj["dictName"].toString();
        sysDict.dictType = obj["dictType"].toString();
        sysDict.status = obj["status"].toString();
        sysDict.searchValue = obj["searchValue"].toString();
        sysDict.createBy = obj["createBy"].toString();
        sysDict.createTime = obj["createTime"].toString();
        sysDict.updateBy = obj["updateBy"].toString();
        sysDict.updateTime = obj["updateTime"].toString();
        sysDict.remark = obj["remark"].toString();
        return sysDict;
    }
};

#endif // DICTTYPE_H
